#include<iostream>
#include<cstdio>
using namespace std;

int main()
{
	int n = 0;
	cin >> n;
	double sum = 0.0;
	int flag = 1;
	for (int i = 1; i <= n; i++)
	{
		sum += 1.0 / i * flag;
		flag = -flag;
	}

	printf("%.4lf", sum);
	
	return 0;
}
